<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function money() {
            var m = prompt('请输入工资：');
            if (isNaN(a)) {
                console.log("您输入的有问题！");
            } else {
                var a;
                if (m > 20000) {
                    a = (m - 20000) * 0.1;
                } else if (m > 8000) {
                    a = (m - 8000) * 0.05;
                } else if (m>3500){
                    a = (m - 3500) * 0.02;
                } else {
                    m = 0;
                }
            }
            document.write("个人税："+ m);
        }
    </script>
</head>
<body>
<input type="button" value="请输入工资：" onclick="money()"/>
</body>
</html>